package xyz.zhouzhaodong.crm.controller;


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import xyz.zhouzhaodong.crm.dto.UniversityStudentsStatisticsDto;
import xyz.zhouzhaodong.crm.service.IUniversityStudentsStatisticsService;
import xyz.zhouzhaodong.crm.util.NoRepeatSubmit;
import xyz.zhouzhaodong.crm.util.RestMessage;

import javax.annotation.Resource;

/**
 * <p>
 * 高校-在校学生统计 前端控制器
 * </p>
 *
 * @author zhouzhaodong
 * @since 2020-06-22
 */
@RestController
@RequestMapping("/university-students-statistics")
public class UniversityStudentsStatisticsController {
    @Resource
    IUniversityStudentsStatisticsService universityStudentsStatisticsService;

    /**
     * 新增高校专在校学生统计
     * @param universityStudentsStatisticsDto
     * @return
     */
    @NoRepeatSubmit
    @RequestMapping("/add")
    public RestMessage addUniversityStudentsStatistics(UniversityStudentsStatisticsDto universityStudentsStatisticsDto){
        return universityStudentsStatisticsService.addUniversityStudentsStatistics(universityStudentsStatisticsDto);
    }

    /**
     * 删除高校专在校学生统计
     * @param universityStudentsStatisticsDto
     * @return
     */
    @RequestMapping("/delete")
    public RestMessage deleteUniversityStudentsStatistics(UniversityStudentsStatisticsDto universityStudentsStatisticsDto){
        return universityStudentsStatisticsService.deleteUniversityStudentsStatistics(universityStudentsStatisticsDto);
    }

    /**
     * 修改高校专在校学生统计
     * @param universityStudentsStatisticsDto
     * @return
     */
    @RequestMapping("/update")
    public RestMessage updateUniversityStudentsStatistics(UniversityStudentsStatisticsDto universityStudentsStatisticsDto){
        return universityStudentsStatisticsService.updateUniversityStudentsStatistics(universityStudentsStatisticsDto);
    }

    /**
     * 查询高校专在校学生统计
     * @param universityStudentsStatisticsDto
     * @return
     */
    @RequestMapping("/select")
    public RestMessage selectUniversityStudentsStatistics(UniversityStudentsStatisticsDto universityStudentsStatisticsDto){
        return universityStudentsStatisticsService.selectUniversityStudentsStatistics(universityStudentsStatisticsDto);
    }
}
